package com.howtographql.hackernews;

/**
 * 功能说明：
 *
 * @author xiaoyu
 * @date 2019/2/21
 */

import com.howtographql.hackernews.user.User;
import graphql.servlet.GraphQLContext;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Optional;

/**
 *
 * @description
 * @version 1.0
 * @author Administrator
 * @date 2019/2/21 14:56
 *
 */
public class AuthContext extends GraphQLContext {
    private final User user;

    public AuthContext(User user, Optional<HttpServletRequest> request, Optional<HttpServletResponse> response) {
        super(request, response);
        this.user = user;
    }

    public User getUser() {
        return user;
    }

}
